from django.db import models
from django.contrib.auth.models import User

from mdeditor.fields import MDTextField

class UserPage(models.Model):
	Owner = models.ForeignKey(User,on_delete=models.CASCADE)
	text = MDTextField()
	class Meta:
		verbose_name_plural = 'users'
	
class CommentUser(models.Model):
	name = models.CharField(max_length=20)
	text = models.TextField(max_length=512)
	Owner = models.ForeignKey(User,on_delete=models.CASCADE)
	class Meta:
		verbose_name_plural = 'comments'
	def __str__(self):
		return str(self.text)
		

class Avatar(models.Model):
	name = models.CharField(max_length=20)
	image = models.ImageField(upload_to="img")

